home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / iso2 / iso10.sty < prev    next >
Text File  |  1991-09-28  |  18KB  |  442 lines

  1. % ISO DOCUMENT STYLE <91/05/02>
  2. %    for LaTeX version 2.09
  3.  
  4. % @(#)iso10.sty    2.6 dated 91/05/02 at 09:57:33
  5.  
  6. % File:       iso10.sty
  7. % Author:     Nicolas North
  8. % Email:      ndn@seg.npl.co.uk
  9. % Date:       91/05/02
  10. %
  11. % A rewrite of art10.doc to typeset in ISO central secretariat-approved
  12. % style.
  13.  
  14. % This file is based on Leslie Lamport's art10.doc.
  15.  
  16. %  ****************************************
  17. %  *               FONTS                  *
  18. %  ****************************************
  19. %
  20.  
  21. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  22. \normallineskip 1pt
  23. \def\baselinestretch{1}
  24.  
  25. % Each size-changing command \SIZE executes the command
  26. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  27. % where:
  28. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  29. %                  value will be \baselinestretch * BASELINESKIP.)
  30. %
  31. %  \FONTSIZE     = Name of font-size command.  The currently available
  32. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  33. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  34. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  35. %  \@FONTSIZE    = The same as the font-size command except with an
  36. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  37. %                  \@FONTSIZE = \@xivpt.
  38. %
  39. % For reasons of efficiency that needn't concern the designer,
  40. % the document style defines \@normalsize instead of \normalsize .  This is
  41. % done only for \normalsize, not for any other size-changing commands.
  42.  
  43. \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  44. \abovedisplayskip 10pt plus2pt minus5pt%
  45. \belowdisplayskip \abovedisplayskip
  46. \abovedisplayshortskip  \z@ plus3pt%   
  47. \belowdisplayshortskip  6pt plus3pt minus3pt%
  48. \let\@listi\@listI}
  49.  
  50. \def\small{\@setsize\small{10pt}\ixpt\@ixpt
  51. \abovedisplayskip 8.5pt plus 3pt minus 4pt%
  52. \belowdisplayskip \abovedisplayskip
  53. \abovedisplayshortskip \z@ plus2pt%
  54. \belowdisplayshortskip 4pt plus2pt minus 2pt
  55. \def\@listi{\leftmargin\leftmargini%
  56. \let\isoclauseref\@currentlabel
  57. \itemindent\leftmargini}}
  58.  
  59. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  60. \abovedisplayskip 6pt plus 2pt minus 4pt%
  61. \belowdisplayskip \abovedisplayskip
  62. \abovedisplayshortskip \z@ plus 1pt%
  63. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  64. \def\@listi{\leftmargin\leftmargini%
  65. \let\isoclauseref\@currentlabel
  66. \itemindent\leftmargini}}
  67.  
  68. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  69. \def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
  70. \def\large{\@setsize\large{13pt}\xipt\@xipt}
  71. \def\Large{\@setsize\Large{15pt}\xiipt\@xiipt}
  72. \def\LArge{\@setsize\LArge{18pt}\xivpt\@xivpt}  % used for annex headings
  73. \def\LARGE{\@setsize\LARGE{20pt}\xviipt\@xviipt}
  74. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  75. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  76.  
  77. % The size font in which the copyright notice is set.
  78. % This should be 9pt.
  79. \def\@copyrightsize{\small}
  80.  
  81. \normalsize  % Choose the normalsize font.
  82.  
  83.  
  84. %  ****************************************
  85. %  *            PAGE LAYOUT               *
  86. %  ****************************************
  87. %
  88. % All margin dimensions measured from a point one inch from top and side
  89. % of page.  
  90.  
  91. % SIDE MARGINS:
  92. % These are the margins used for setting stuff before the title.
  93. % \maketitle calls \iso@setmargins to set margins for the body of the
  94. %   standard.
  95. \if@twoside                 % Values for two-sided printing (the default):
  96.    \oddsidemargin  59mm     %   Left margin on odd-numbered pages.
  97.    \evensidemargin -14mm    %   Left margin on even-numbered pages.
  98.    \marginparwidth 8mm      %   Width of marginal notes (none in ISO standards).
  99. \else                       % Values for one-sided printing:
  100.                 %   (can't happen in ISO style)
  101.    \oddsidemargin  -23pt    %   Note that \oddsidemargin = \evensidemargin
  102.    \evensidemargin -23pt
  103.    \marginparwidth 90pt 
  104. \fi
  105. \marginparsep 1mm          % Horizontal space between outer margin and 
  106.                             % marginal note
  107.  
  108. % Allow the user to shift the page across if their laser printer is
  109. % mis-aligned. There should really be a vertical version of this as well.
  110. \newdimen\@leftoffset \@leftoffset=\z@
  111. \def\leftoffset#1{
  112.     \setlength{\@leftoffset}{#1}
  113.     \advance\oddsidemargin by\@leftoffset
  114.     \advance\evensidemargin by \@leftoffset}
  115.  
  116. % VERTICAL SPACING:        
  117.                          % Top of page:
  118. \topmargin -54pt         %    Nominal distance from top of page to top of
  119.                          %    box containing running head.
  120. \headheight 25pt         %    Height of box containing running head.
  121. \headsep 39pt            %    Space between running head and text.
  122. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  123.                          % Bottom of page:
  124. \footskip 27pt           %    Distance from baseline of box containing foot 
  125.                          %    to baseline of last line of text.
  126.  
  127.  
  128. % DIMENSION OF TEXT:
  129.  
  130. \textheight 240mm
  131. \textwidth 117mm         % Width of text line.
  132.                          % For two-column mode: 
  133. \columnsep 10mm          %    Space between columns 
  134. \columnseprule 0pt       %    Width of rule between columns.
  135.  
  136. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  137. % natural height instead of being stretched to exactly \textheight.
  138.  
  139. % Page layout for the body of the standard
  140. \def\iso@setmargins{
  141.     \global\oddsidemargin -4mm
  142.     \global\advance\oddsidemargin by\@leftoffset
  143.     \global\evensidemargin -14mm
  144.     \global\advance\evensidemargin by\@leftoffset
  145.     \global\textwidth 180mm}
  146.  
  147. % FOOTNOTES:
  148.  
  149. \footnotesep 6.65pt   % Height of strut placed at the beginning of every
  150.                       % footnote = height of normal \footnotesize strut,
  151.                       % so no extra space between footnotes.
  152.  
  153. \skip\footins 9pt plus 4pt minus 2pt  % Space between last line of text and 
  154.                                       % top of first footnote.
  155.  
  156. % FLOATS: (a float is something like a figure or table)
  157. %
  158. % NDN: I haven't changed the float parameters for the iso style
  159. %
  160. %  FOR FLOATS ON A TEXT PAGE:
  161. %
  162. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  163. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  164.                                          % to top or bottom of text page.
  165. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  166.                                          % at top or bottom of page.
  167. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  168.                                          % text.
  169. \@maxsep 20pt                            % The maximum of \floatsep, 
  170.                                          % \textfloatsep and \intextsep (minus
  171.                                          % the stretch and shrink).
  172. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  173. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  174.                                          % figures in two-column mode.
  175. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  176.                                          % floats.
  177. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  178.                                          % \dbltexfloatsep.
  179.  
  180. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  181. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  182. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  183.                          % 0pt plus ...)                                    
  184. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  185. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  186.                          % 0pt plus ... )                                   
  187.  
  188. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  189. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  190. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  191. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  192.                          % 0pt plus ... )                                   
  193. % MARGINAL NOTES:
  194. %
  195. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  196.                          % notes.
  197.  
  198.  
  199. %  ****************************************
  200. %  *           PARAGRAPHING               *
  201. %  ****************************************
  202. %
  203. \parskip \baselineskip             % Extra vertical space between paragraphs.
  204. \parindent 0pt                     % Width of paragraph indentation.
  205. %\topsep 0pt plus 1pt minus 1pt     % Extra vertical space, in addition to 
  206.                                    % \parskip, added above and below list and
  207.                                    % paragraphing environments.
  208. \partopsep 0pt plus 1pt minus 1pt  % Extra vertical space, in addition to 
  209.                                    % \parskip and \topsep, added when user
  210.                                    % leaves blank line before environment.
  211. %\itemsep 2pt plus 1pt minus 1pt    % Extra vertical space, in addition to
  212.                                    % \parskip, added between list items.
  213.  
  214. % The following page-breaking penalties are defined
  215. % NDN: unchanged from art10.doc
  216.  
  217. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  218. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  219. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  220.  
  221. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  222. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  223. \@itempenalty     -\@lowpenalty    % Between list items.
  224.  
  225. % \clubpenalty         % 'Club line'  at bottom of page.
  226. % \widowpenalty        % 'Widow line' at top of page.
  227. % \displaywidowpenalty % Math display widow line.
  228. % \predisplaypenalty   % Breaking before a math display.
  229. % \postdisplaypenalty  % Breaking after a math display.
  230. % \interlinepenalty    % Breaking at a line within a paragraph.
  231. % \brokenpenalty       % Breaking after a hyphenated line.
  232.  
  233.  
  234. %    ****************************************
  235. %    *             SECTIONS                 *
  236. %    ****************************************
  237. %
  238.  
  239. % NDN: note that section names have changed from the usual LaTeX ones.
  240.  
  241. % \secdef{UNSTARCMDS}{STARCMDS} :
  242. %    When defining a sectionioning command without using
  243. %    \@startsection, you can use \secdef as follows:
  244. %       \def\part { ... \secdef \CMDA \CMDB }
  245. %       \def\CMDA  [#1]#2{ ... }     % Command to define \part[...]{...}
  246. %       \def\CMDB  #1{ ... }         % Command to define \part*{...}
  247.  
  248. % NDN: I haven't considered parts for the iso style yet, so this is just
  249. % as in art10.doc.
  250. \def\part{\par               % New paragraph
  251.    \addvspace{4ex}           % Adds vertical space above title.
  252.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  253.    \secdef\@part\@spart}     % to \@afterindenttrue to have indent.
  254.  
  255. \def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1
  256.         \refstepcounter{part}                    %  THEN step part counter
  257.         \addcontentsline{toc}{part}{\thepart     %       add toc line
  258.         \hspace{1em}#1}\else                     %  ELSE add unnumbered line
  259.       \addcontentsline{toc}{part}{#1}\fi         % FI
  260.    { \parindent 0pt \raggedright 
  261.     \ifnum \c@secnumdepth >\m@ne   % IF secnumdepth > -1 
  262.       \Large \bf Part \thepart     %   THEN Print 'Part' and 
  263.       \par \nobreak                %          number in \Large boldface.
  264.     \fi                            % FI
  265.     \huge \bf                      % Select \huge boldface.
  266.     #2\markboth{}{}\par }          % Print title and set heading marks null.
  267.     \nobreak                       % TeX penalty to prevent page break.
  268.     \vskip 3ex                     % Space between title and text.
  269.    \@afterheading                  % Routine called after part and
  270.     }                              %     section heading.
  271.  
  272. % Heading for \part* command
  273. \def\@spart#1{{\parindent 0pt \raggedright 
  274.     \huge \bf                       
  275.     #1\par}                         % Title.
  276.     \nobreak                        % TeX penalty to prevent page break.
  277.     \vskip 3ex                      % Space between title and text.
  278.     \@afterheading                  % Routine called after part and
  279.   }                                 %     section heading.
  280.  
  281. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  282. %            optional * [ALTHEADING]{HEADING}
  283. %    Generic command to start a section.  
  284. %    NAME       : e.g., 'clause'
  285. %    LEVEL      : a number, denoting depth of section -- i.e., section=1,
  286. %                 clause = 2, etc.  A section number will be printed if
  287. %                 and only if LEVEL < or = the value of the secnumdepth
  288. %                 counter.
  289. %    INDENT     : Indentation of heading from left margin
  290. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  291. %                 If negative, then paragraph indent of text following 
  292. %                 heading is suppressed.
  293. %    AFTERSKIP  : if positive, then skip to leave below heading,
  294. %                       else - skip to leave to right of run-in heading.
  295. %    STYLE      : commands to set style
  296. %  If '*' missing, then increments the counter.  If it is present, then
  297. %  there should be no [ALTHEADING] argument.  A sectioning command
  298. %  is normally defined to \@startsection + its first six arguments.
  299.  
  300. % A definition needs to set its number and title in
  301. %  different sizes so it manipulates its argument before passing it on
  302. %  to \@startsection.
  303.  
  304. % These spacings are provisional only.
  305.  
  306. \def\section{\@startsection {section}{1}{\z@}{3ex plus 1ex minus 
  307.     .2ex}{.1ex plus .1ex}{\Large\bf}}
  308. \def\clause{\@startsection{clause}{2}{\z@}{2ex plus .5ex minus
  309.    .2ex}{.1ex plus .1ex}{\large\bf}}
  310. \def\definition#1{\@startsection{definition}{2}{\z@}{2ex plus .5ex minus
  311.    .2ex}{-.5em plus -.1em minus -.1em}{\large\bf}%
  312.    {\protect{\normalsize\bf#1:\thinspace}}}
  313. \def\subclause{\@startsection{subclause}{3}{\z@}{2ex plus 1ex minus
  314.    .2ex}{.1ex plus .1ex}{\normalsize\bf}}
  315. \def\subsubclause{\@startsection
  316.      {subsubclause}{4}{\z@}{2ex plus 1ex minus .2ex}{.1ex plus .1ex}
  317.      {\normalsize\bf}}
  318. \def\namelesssubsubclause{\@startsection{namelesssubsubclause}{4}{\z@}{
  319.      2ex plus 1ex minus .2ex}{-.5em plus -.1em minus -.1em}{\normalsize\bf}{}}
  320. \def\subsubsubclause{\@startsection
  321.      {subsubsubclause}{5}{\parindent}{2ex plus 1ex minus 
  322.      .2ex}{.1ex plus .1ex}{\normalsize\bf}}
  323. \def\namelesssubsubsubclause{\@startsection{namelesssubsubsubclause}{5}{\z@}{
  324.      2ex plus 1ex minus .2ex}{-.5em plus -.1em minus -.1em}{\normalsize\bf}{}}
  325.  
  326. % Header for introductory sections which are set in \LArge.
  327. % The spacing is provisional.
  328. \def\@introsection{\@startsection{section}{1}{\z@}{3ex plus 1ex minus 
  329.     .2ex}{.1ex plus .1ex}{\LArge\bf}*}
  330.  
  331. % A special command for the foreword. This ensures that
  332. %  a new page is started and the title is in \LArge,
  333. %  starting 84mm from the top of the page.
  334. % If there is no foreword, we should skip a page number before the
  335. %  introduction (if there is one). \if@foreword allows us to test whether
  336. %  a foreword has appeared.
  337. \newif\if@foreword \@forewordfalse
  338. \def\foreword{
  339. \@forewordtrue\newpage\vspace*{39mm}\@introsection{Foreword}
  340. \addcontentsline{toc}{iso@intro}{\bf Foreword}}
  341.  
  342.  
  343. % A special command for introductory sections. Ensures that
  344. %  a new page is started, skipping a page number
  345. %  if there was no foreword and camera-ready copy is being produced and the
  346. %  title is in \LArge, starting 84mm from the top of the page.
  347. % The spacing around the header is currently that for sections.
  348. \def\introduction{
  349. \newpage\vspace*{39mm}\@introsection{Introduction}
  350. \addcontentsline{toc}{iso@intro}{\bf Introduction}
  351. \if@cameraready\if@foreword\else\stepcounter{page}\fi\fi}
  352.  
  353.  
  354. % Default initializations of \...mark commands.  (See below for their
  355. % use in defining page styles.
  356. %
  357.  
  358. \def\sectionmark#1{}           % Preloaded definitions
  359. \def\clausemark#1{}
  360. \def\definitionmark#1{}
  361. \def\subclausemark#1{}
  362. \def\subsubclausemark#1{}
  363. \def\namelesssubsubclausemark#1{}
  364. \def\subsubsubclausemark#1{}
  365. \def\namelesssubsubsubclausemark#1{}
  366.  
  367. % The value of the counter secnumdepth gives the depth of the
  368. % highest-level sectioning command that is to produce section numbers.
  369. %
  370.  
  371. \setcounter{secnumdepth}{5}
  372.  
  373.  
  374. %    ****************************************
  375. %    *                LISTS                 *
  376. %    ****************************************
  377. %
  378.  
  379. % The following commands are used to set the default values for the list
  380. % environment's parameters. See the LaTeX manual for an explanation of
  381. % the meanings of the parameters.  Defaults for the list environment are
  382. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  383. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  384. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  385. % called for a third-level list.)  By convention, \@listK should set
  386. % \leftmargin to \leftmarginK.
  387. %
  388. % For efficiency, level-one list's values are defined at top level, and
  389. % \@listi is defined to set only \leftmargin
  390. % NDN: list spacing is simple for ISO standards: everything is one line
  391. % apart, so listii, listiii etc are very simple.
  392. % ISO set all lists with a separation of 1em between label and text,
  393. % regardless of the label width - looks awful but there you are.
  394.  
  395. \leftmargini 1em
  396. \leftmarginii 1em
  397. \leftmarginiii 1em
  398. \leftmarginiv 1em
  399. \leftmarginv 1em
  400. \leftmarginvi 1em
  401.  
  402. \leftmargin\leftmargini
  403. \labelsep 1em
  404. \labelwidth 0pt
  405. % \parsep 4pt plus 2pt minus 1pt (Removed 9 Jun 87)
  406.  
  407. % \@listI defines top level and \@listi values of
  408. % \leftmargin, \itemindent, \topsep, \parsep, and \itemsep
  409. % Sets up \isoclauseref so that enumerated lists can refer to it for labeling
  410. \def\@listI{\leftmargin\leftmargini \parsep\baselineskip%
  411. \itemindent\leftmargini
  412. \let\isoclauseref\@currentlabel
  413. \topsep 0pt plus 1pt minus 1pt%
  414. \itemsep 0pt plus 1pt minus 1pt}
  415.  
  416. \let\@listi\@listI
  417. \@listi 
  418.  
  419.  
  420. \def\@listii{\leftmargin\leftmarginii
  421.    \let\isoclauseref\@currentlabel
  422.    \itemindent\leftmarginii}
  423.  
  424. \def\@listiii{\leftmargin\leftmarginiii
  425.     \let\isoclauseref\@currentlabel
  426.     \itemindent\leftmarginiii}
  427.  
  428. \def\@listiv{\leftmargin\leftmarginiv
  429.      \let\isoclauseref\@currentlabel
  430.      \itemindent\leftmarginiv}
  431.  
  432. \def\@listv{\leftmargin\leftmarginv
  433.      \let\isoclauseref\@currentlabel
  434.      \itemindent\leftmarginv}
  435.  
  436. \def\@listvi{\leftmargin\leftmarginvi
  437.      \let\isoclauseref\@currentlabel
  438.      \itemindent\leftmarginvi}
  439.  
  440.  
  441.  
  442.